package com.yunfeisoft.business.model;

import com.yunfeisoft.common.base.BaseModel;
import com.yunfeisoft.common.sql.record.TransientField;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * ClassName: CareTurnoverCard
 * Description: 悠南山养老中心护理翻身卡
 *
 * @Author: Jackie liu
 * Date: 2020-05-22
 */
@Entity
@Table(name = "TT_CARE_TURNOVER_CARD")
public class CareTurnoverCard extends BaseModel implements Serializable {

    /**
     * Field serialVersionUID: 序列号
     */
    private static final long serialVersionUID = 1L;

    /**
     * 老人入住关联id
     */
    @Column
    private String elderId;

    @TransientField
    private String elderName;

    public String getElderName() {
        return elderName;
    }

    public void setElderName(String elderName) {
        this.elderName = elderName;
    }


    /**
     * 是否有褥疮1有2没有
     */
    @Column
    private Integer decubitusStatus;

    public String getDecubitusStatusStr() {
        if (decubitusStatus == null) {
            return null;
        }
        if (decubitusStatus == 1) {
            return "有";
        } else {
            return "没有";
        }
    }

    @TransientField
    private String createName;

    @TransientField
    private String roomNum;

    @TransientField
    private String sex;

    public String getSexStr() {
        if (sex == null) {
            return null;
        }
        if ("1".equals(sex)) {
            return "男";
        } else {
            return "女";
        }
    }

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    public String getRoomNum() {
        return roomNum;
    }

    public void setRoomNum(String roomNum) {
        this.roomNum = roomNum;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    /**
     * 部位
     */
    @Column
    private String part;

    /**
     * 翻身方向1左2中3右
     */
    @Column
    private Integer direction;

    public String getDirectionStr() {
        if (direction == null) {
            return null;
        }
        if (direction == 1) {
            return "左";
        } else if (direction == 2) {
            return "中";
        } else {
            return "右";
        }
    }

    public String getElderId() {
        return elderId;
    }

    public void setElderId(String elderId) {
        this.elderId = elderId;
    }

    public Integer getDecubitusStatus() {
        return decubitusStatus;
    }

    public void setDecubitusStatus(Integer decubitusStatus) {
        this.decubitusStatus = decubitusStatus;
    }

    public String getPart() {
        return part;
    }

    public void setPart(String part) {
        this.part = part;
    }

    public Integer getDirection() {
        return direction;
    }

    public void setDirection(Integer direction) {
        this.direction = direction;
    }


}